import Mock, { mock } from 'mockjs';
Mock.mock("/api/login","post",Mock.mock({
    code:200,
    msg:Mock.Random.csentence(12,15),
    user:{name:"杨超",age:19},
    token:'松江'
})
)
Mock.mock("api/fenlei1","get",{
     "data|4":[{img:Mock.Random.image('50x50',"#0f0"),name:()=>Mock.Random.cname(),id:()=>Mock.Random.id()}]
})
Mock.mock("api/wodei","get",{
    "data":[{img:Mock.Random.image('60x60',"#FFFFFF"),name:"宋江", name1:"升级功能，敬请期待",title:"设置"}]
})
Mock.mock("api/fenlei","get",{
    "data|4":[{img:"/src/assets/big.jpg",name:"小宋",title:"￥6.00",yuanjia:"￥3.00",}]
})
Mock.mock("api/fengleiye","get",{
    "data|4":[{img:"/src/assets/big.jpg",name:"美式面包",title:"￥6.00",yuanjia:"￥3.00"}]
})
Mock.mock("api/gouwuche","get",{
    "data|4":[{img:"/src/assets/big.jpg",name:"美式面包",title:"￥9亿元",num:0}]
})
Mock.mock("/api/goods","post",(p)=>{
    console.log(p)
    //根据不同的ID获取不同的数据

    return Mock.mock({
        "data|4":[{
                img:Mock.Random.image('120x150','#666'),
                title:()=>Mock.Random.csentence(3,5),
                id:()=>Mock.Random.id(),
                jiage:10.00,
                yuanjia:3.00

            }]
    })
})
Mock.mock("api/home","get",{
    "data|4":[{img:Mock.Random.image('50x50','#666'),mj:["待付款","待配送","待接收","已完成"],}]
})
Mock.mock("api/fk","get",{
    "data|2":[{img:Mock.Random.image('80x80','#666'),name:"美式面包",danjia:"6",geshu:"1"}]
})
Mock.mock("api/ps","get",{
    "data":[{img:Mock.Random.image('80x80','#666'),name:"美式面包", shijian:"00:10:00",danjia:"6",geshu:"1"}]
})
Mock.mock("api/wc","get",{
    "data":[{img:Mock.Random.image('80x80','#666'),name:"美式面包", title:"再次购买"}]
})
Mock.mock("api/js","get",{
    "data":[{img:Mock.Random.image('80x80',),name:"美式面包", shijian:"00:10:00",danjia:"6",geshu:"1",img1:Mock.Random.image('40x40'),name1:'戴宗',ps:"配送",ps1:"金牌配送员",img2:Mock.Random.image('30x30'),cd:"催单",ts:"投诉",ps2:"配送已完成"}]
})
Mock.mock("api/sp","get",{
    "data":[{img:Mock.Random.image('375x200',),name:"美式面包",sc:"收藏",jiage:"6.00",yj:"3.00"}]
})



